package com.example.bootDemo.quartz;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * @description: 创建任务实现类
 * @author: zys
 * @create: 2021-04-09 16:31
 **/
public class TestQuartz implements BaseTaskJob {

    private int i = 0;

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        i++;
        System.out.println("task2>>>>>>>  " + i);

        try {
            //执行完此任务就删除自己
            //  QuartzJobManager.getInstance().jobdelete(this.getClass().getSimpleName(),"ah");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
